//
//  UIBarButtonItem-Extension.swift
//  斗鱼
//
//  Created by 汪泽煌 on 2017/2/14.
//  Copyright © 2017年 汪泽煌. All rights reserved.
//

import UIKit

extension UIBarButtonItem{
    
    
    convenience init(image:UIImage,selectImage:UIImage,size:CGSize) {
        
        let btn = UIButton()
        
        btn.setImage(image, for: .normal)
        btn.setImage(selectImage, for: .highlighted)
        btn.frame = CGRect(origin: CGPoint.zero, size: size)
        
        self.init(customView:btn)
        
    }
    
}
